﻿namespace MediaFS.Data
{
    public abstract class MemoryFile : MemoryItem
    {
    	protected MemoryFile(MemoryFolder parent, string name)
    		: base (parent, name)
    	{    		
    	}

        public abstract long Size
        {
        	get;
			set; 
        }

        public abstract uint Write(long offset, byte[] buffer);
        public abstract uint Read(long offset, byte[] buffer);

        public static bool UseMemStream;

        public static MemoryFile New(MemoryFolder parent, string name)
        {
            return new MemoryStreamFile(parent, name);
        }
    }
}
